<%-- 

page pour editer les absence / lister ?

--%>
	<%@ page import="gestionNotes.model.generated.*"%>
	<jsp:useBean id="data" class="gestionNotes.model.Data" scope="request"/>
	
	<div id="information">
		<div><label class="disabled"><a href="/GestionNotes/do/absence?mode=ajout">Absences du <%=data.get("date")%></a></label></div>
		<form action="absence" method="post" id="filter">
			<input type="hidden" name="submit_filter" value="1">
			<input type="hidden" name="date" value="<%=data.get("date")%>">
			<input type="hidden" name="matiere" value="<%=data.get("matiere")%>">
			<label for="name">Groupe</label>
			<select id="name" name="group" onchange="submit()">
					<option value="all" <% if(data.get("group").toString().contentEquals("all")) out.print("selected"); %>>TOUS</option>
					<%for (Groupe g : GroupePeer.getList()) {  %>
						<option value="<%=g.getGroupeId()%>" <% if(data.get("group").toString().contentEquals(""+g.getGroupeId())) out.print("selected"); %>><%=g.getName()%></option>
					<%} %>
			</select>
		</form>
	</div>
	
	<form action="absence" method="post">
		<input type="hidden" name="date" value="<%=data.get("date")%>">
		<input type="hidden" name="matiere" value="<%=data.get("matiere")%>">
		<div><table class="classic order">
		<thead><tr>
			<th>
				<span>NOM</span>
				<img src="../include/img/sort_down_red.png" width="25" alt="down" title="tri de z-a" onclick="order('name', false)">
				<img src="../include/img/sort_up_red.png" width="25" alt="up" title="tri de a-z" onclick="order('name', true)">
			</th>
			<th> 
				<span>Prenom</span>
				<img src="../include/img/sort_down_red.png" width="25" alt="down" title="tri de z-a" onclick="order('firstname', false)">
				<img src="../include/img/sort_up_red.png" width="25" alt="up" title="tri de a-z" onclick="order('firstname', true)">
			</th>
			<th> 
				<span>Groupe</span>
				<img src="../include/img/sort_down_red.png" width="25" alt="down" title="tri de z-a" onclick="order('group', false)">
				<img src="../include/img/sort_up_red.png" width="25" alt="up" title="tri de a-z" onclick="order('group', true)">
			</th>
			<th> 
				<span>Absent ?</span>
				<input type="checkbox" title="tout cocher/decocher" onclick="allCheckbox()">
			</th>
		</tr></thead>
		<tbody>
			<%for (Etudiant e : EtudiantPeer.getList(""+data.get("group"))) {  %>
			<tr>
				<td class="name"><span><%=e.getLastName().toUpperCase()%></span></td>
				<td class="firstname"><span><%=e.getFirstName()%></span></td>
				<td class="group"><span><%=e.getGroupe().getName()%></span></td>
				<td><span><input name="absence" type="checkbox" value=<%=e.getEtudiantId()%> size="5"/></span></td>
			</tr> 
			<%} %>
		</tbody>
		</table></div>
		
		<div class="submit"><input type="submit" value="Envoyer" name="submit_absence"></div>
	</form>